package org.meetunexpectedly.service.middleground;

import com.baomidou.mybatisplus.extension.service.IService;
import org.meetunexpectedly.entity.middleground.AssignRoleVO;
import org.meetunexpectedly.entity.middleground.AuthorityVO;
import org.meetunexpectedly.entity.middleground.Role;
import org.meetunexpectedly.entity.middleground.Tree;
import org.meetunexpectedly.entity.vo.Result;

import java.util.List;

/**
 * @Description: 角色服务接口
 * @Author: pupil
 * @Date: 2024/09/03 下午 5:17
 */
public interface RoleService extends IService<Role> {
    /**
     * 树形
     *
     * @return
     */
    List<Tree> tree();

    /**
     * 分配用户角色
     *
     * @param assignRoleVO 分配角色信息
     * @return
     */
    Result assignRole(AssignRoleVO assignRoleVO);

    /**
     * 删除角色
     * @param id
     * @return
     */
    Boolean removeRole(Long id);

    /**
     * 分配权限
     * @param authorityVO 权限信息
     */
    Boolean assignPermission(AuthorityVO authorityVO);
}
